package com.gis.halodepok;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;



public class MenuUtama extends Activity implements View.OnClickListener {
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu_utama);
        Button alert=(Button)findViewById(R.id.about);
        alert.setOnClickListener(this); 
        
        Button next =(Button) findViewById(R.id.menu);
		next.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View view) {
				Intent myIntent = new
						Intent(view.getContext(),MenuKategori.class);
				startActivityForResult(myIntent, 0);
			}
		});
        
 
		    
		Button next2 =(Button) findViewById(R.id.exit);
		next2.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View view) {
				finish();
			}
		});
    
    
    }
    
    
 @Override
 public void onClick(View view) {
  // TODO Auto-generated method stub
   new AlertDialog.Builder(this)
    .setTitle ("About")
    .setMessage ("Michael Dennis Adam \n54410385")
    .setIcon (R.drawable.gunadarma)
    .setNeutralButton ("close", new DialogInterface.OnClickListener() {
     @Override
     public void onClick(DialogInterface dlg, int sumthin) {
      // TODO Auto-generated method stub 

     }
    })
 .show(); 
 }
 



@Override
public boolean onCreateOptionsMenu(Menu menu) {
	// Inflate the menu; this adds items to the action bar if it is present.
	getMenuInflater().inflate(R.menu.main, menu);
	return true;
	
	
	
}

}